package com.wteam.PoJo.DTO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "购物车")

public class cart implements Serializable {

    @ApiModelProperty(value = "id",required = true)
    private Integer id;

    @ApiModelProperty(value = "成员id",required = true)
    private Integer memberId;

    @ApiModelProperty(value = "商品id",required = true)
    private Integer goodsId;

    @ApiModelProperty(value = "用户购买数量",required = true)
    private Integer quantity;

    @TableField(select = false)//不参与查询
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间", example = "2021-05-17 23:59:59", required =false)
    @Hidden
    private LocalDateTime addedTime;

    @ApiModelProperty(value = "是否选中 1:选中 2：未选中（默认）",required = true)
    private Integer selected;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品的图片",required = true)
    private String goodimage;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品的名字）",required = true)
    private String goodname;

    @TableField(exist = false)
    @ApiModelProperty(value = "单个商品价格）",required = true)
    private Double oneGoodPrice;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品详情",required = true)
    private String intro;

}
